﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using DataControl;
using BUS;
using System.IO;
using System.Text;

namespace ATW.MT
{
    public partial class test : System.Web.UI.Page
    {
        Push.JPush push = new Push.JPush();
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void lbnSend_Click(object sender, EventArgs e)
        {
            string name = txtName.Text.Trim();
            string content = txtContent.Text.Trim();
            push.PushByAlias(name, content);
        }
        protected void lbnSeanAll_Click(object sender, EventArgs e)
        {
            push.PushTest();

        }
        protected void lbnContract_Click(object sender, EventArgs e)
        {
            string requestID = txtName.Text.Trim();
            string contactID = new BUS.bus_C_Conn().getNewId();
            string path = ConfigurationManager.AppSettings["EnCusContactFilePath"];
            new CommonClass.Contact().GenerateCustomerContactEN(contactID, requestID, path);
        }
        protected void lbnAddPdf_Click(object sender, EventArgs e)
        {
            string fileName="";
            StreamReader sr = new StreamReader("E:/Projects/安特威/AnTeWei/CommonFile/aa.html", Encoding.UTF8);
            string strContract = sr.ReadToEnd();
            sr.Close();
            sr.Dispose();
            new CommonHelp().GeneretePdf( strContract, out fileName);
        }
        protected void delAlias_Click(object sender, EventArgs e)
        {
            try
            {
                push.DelAlias(txtName.Text.Trim());
            }
            catch (Exception ex)
            {
 
            }
        }
    }
}